<%--
    Document   : Contact
    Created on : Oct 29, 2011, 11:38:16 AM
    Author     : Quangtv
--%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">


<%@page import="DTO.SubjectDTO"%>
<%@page import="java.util.ArrayList"%>
<%@page import="BLO.SubjectBLO"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
<script type="text/javascript">
    function setVisibility(username){
        if(username == "null"){
            document.getElementById("person_info").style.visibility = "hidden";
            document.getElementById("login_form").style.visibility = "visible";
        }else{
            document.getElementById("person_info").style.visibility = "visible";
            document.getElementById("login_form").style.visibility = "hidden";
        }
    }
</script>
<html>

    <head>
        <title>Contact Us</title>
        <meta name="description" content="website description" />
        <meta name="keywords" content="website keywords, website keywords" />
        <meta http-equiv="content-type" content="text/html; charset=windows-1252" />
        <link rel="stylesheet" type="text/css" href="style/css/style.css" />
    </head>
    <%
                String username = (String) session.getAttribute("USERNAME");
    %>
    <body onload='setVisibility("<%=username%>")'>
        <div id="main">
            <div id="header">
                <div id="logo">
                    <div id="logo_text">
                        <!-- class="logo_colour", allows you to change the colour of the text -->
                        <h1><a href="index.jsp">Student<span class="logo_colour">Management</span></a></h1>
                        <h2>Simple. fast. effective. </h2>
                    </div>
                </div>
                <div id="menubar">
                    <ul id="menu">
                        <!-- put class="selected" in the li tag for the selected page - to highlight which page you're on -->
                        <li id="person_info"><a href="Controller?Action=Logout"><%= username%> (Logout)</a></li>
                        <li><a href="index.jsp">Home</a></li>
                        <li><a href="Education.jsp">Education</a></li>
          <li><a href="#">Library</a></li>
                        <li class="selected"><a href="Contact.jsp">Contact Us</a></li>
                    </ul>
                </div>
            </div>
            <div id="content_header"></div>
            <div id="site_content">
                <div class="sidebar">
                    <!-- insert your sidebar items here -->
                    <h3>Resources</h3>
                    <ul id="list-nav">
                        <li><a href="viewCourses.jsp">Courses</a></li>
                        <li><a href="mail.fpt.edu.vn">Mail</a></li>
                        <li><a href="http://cms-hcm.fpt.edu.vn/elearning/feedback">Feedback</a></li>
                        <li><a href="schedule.jsp">Schedule</a></li>
                        <li><a href="http://msdn70.e-academy.com/elms/Storefront/Home.aspx?campus=fptuniversity_it">MSDN AA</a></li>
                        <li><a href="http://cms-hcm.fpt.edu.vn/elearning/mod/resource/view.php?id=185">Change Password</a></li>
                    </ul>
                    <p style="padding-top: 15px"><span>&nbsp;</span>
                    <form method="POST" action="Controller" id="login_form">
                        <!-- Show khi ch&#432;a login vào h&#7879; th&#7889;ng -->
                        <h3>Login</h3>
                        Username:<input id="textbox" name="txtUsername" type="text" >
                        Password:<input id="textbox" name="txtPassword" type="password" >
                        <input name="Action" type="submit" value="Login">
                    </form>

                    <!-- Sau khi &#273;ã login vào h&#7879; th&#7889;ng, show nh&#7919;ng course c&#7911;a sinh viên ho&#7863;c giáo viên -->
                    <h3>All Courses</h3>
                    <ul>
                        <%
                                    SubjectBLO sblo = new SubjectBLO();
                                    ArrayList<SubjectDTO> subjectList = new ArrayList<SubjectDTO>();

                                    subjectList = sblo.getAllSubjects();
                                    request.setAttribute("SLIST", subjectList);
                        %>
                        <c:set var="list" value="${requestScope.SLIST}"></c:set>
                        <c:forEach items="${list}" var="subject">
                            <li><a href="#"><c:out value="${subject.strSubjectName}"/></a></li>
                        </c:forEach>
                    </ul>
                </div>
                <div id="content">
                    <h1>Contact Us</h1>
        <form action="" method="post">
          <div class="form_settings">
            <p><span>Name</span><input class="contact" type="text" name="your_name" value="" /></p>
            <p><span>Email Address</span><input class="contact" type="text" name="your_email" value="" /></p>
            <p><span>Message</span><textarea class="contact textarea" rows="8" cols="50" name="your_enquiry"></textarea></p>
            <p style="padding-top: 15px"><span>&nbsp;</span><input class="submit" type="submit" name="contact_submitted" value="submit" /></p>
          </div>
        </form>
        <p><br /><br />NOTE: A contact form such as this would require some way of emailing the input to an email address.</p>

                </div>
            </div>
            <div id="content_footer"></div>
            <div id="footer">
                <a href="index.jsp">Home</a> | <a href="#">News</a> | <a href="#">Education</a> | <a href="#">Library</a> | <a href="contact.html">Contact Us</a>
            </div>
        </div>
    </body>
</html>
